package com.mofro.mock.impl;

import java.util.ArrayList;
import java.util.List;

import com.mofro.mock.Mock;

/**
 *
 * @author sgianazz
 */
public class StoreProcedureMock implements Mock {
	
	private String schemaName;
	private String name;
    private List<String> parameters = new ArrayList<String>();
    private List<String> bodyLines = new ArrayList<String>();
	
    public StoreProcedureMock(String schemaName, String name) {
		super();
		this.schemaName = schemaName;
		this.name = name;
	}   

	public void addParameter(String parameterName, StoreProcedureParameterType paramType, StoreProcedureDataType dataType) {
        StringBuffer sb = new StringBuffer(parameterName);
        sb.append(" ");
        sb.append(paramType.getText());
        sb.append(" ");
        sb.append(dataType.getText());
        parameters.add(sb.toString());
    }

    public void addBody(String bodyLine) {
       bodyLines.add(bodyLine);
    }

    public void clearBody() {
       bodyLines.clear();
    }

	public String getSchemaName() {
		return schemaName;
	}

	public String getName() {
		return name;
	}

	public List<String> getParameters() {
		return parameters;
	}

	public List<String> getBodyLines() {
		return bodyLines;
	}    
}
